package demoMod.invincibleOne.powers;

import com.megacrit.cardcrawl.actions.common.HealAction;
import com.megacrit.cardcrawl.actions.unique.IncreaseMaxHpAction;
import com.megacrit.cardcrawl.core.AbstractCreature;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.localization.PowerStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.powers.AbstractPower;
import demoMod.invincibleOne.InvincibleOneMod;
import demoMod.invincibleOne.interfaces.MonsterGainBlockHook;

public class BattleYogaPower extends AbstractPower implements MonsterGainBlockHook {
    public static final String POWER_ID = InvincibleOneMod.makeID("BattleYogaPower");
    private static final PowerStrings powerStrings = CardCrawlGame.languagePack.getPowerStrings(POWER_ID);
    public static final String NAME = powerStrings.NAME;
    public static final String[] DESC = powerStrings.DESCRIPTIONS;

    public BattleYogaPower(AbstractCreature owner, int amount) {
        this.owner = owner;
        this.ID = POWER_ID;
        this.name = NAME;
        this.amount = amount;
        this.priority = 30;
        this.updateDescription();
        loadRegion("painfulStabs");
    }

    @Override
    public void updateDescription() {
        this.description = DESC[0];
    }

    @Override
    public float onGainedBlock(AbstractCreature owner, float amount) {
        if (owner == this.owner) {
            owner.increaseMaxHp((int)amount * this.amount, true);
        }
        return amount;
    }
}
